//This is a cmocean colormap
//All credit to Kristen Thyng
//This colormap is under the MIT License
//All cmocean colormaps are available at https://github.com/matplotlib/cmocean/tree/master/cmocean/rgb

namespace ScottPlot.Colormaps;

public class Oxy : IColormap
{
    public string Name => "Oxy";
    readonly CustomPalette Colormap;
    public Color GetColor(double position) => Colormap.GetColor(position);

    public Oxy()
    {
        Color[] colors =
        [
            new( 64, 5, 5 ),
            new( 65, 5, 5 ),
            new( 67, 6, 6 ),
            new( 68, 6, 6 ),
            new( 71, 6, 7 ),
            new( 72, 6, 7 ),
            new( 73, 6, 7 ),
            new( 75, 6, 8 ),
            new( 77, 7, 8 ),
            new( 79, 7, 9 ),
            new( 80, 7, 9 ),
            new( 81, 7, 9 ),
            new( 84, 7, 10 ),
            new( 85, 7, 11 ),
            new( 87, 7, 11 ),
            new( 88, 7, 11 ),
            new( 91, 7, 12 ),
            new( 92, 7, 12 ),
            new( 93, 7, 12 ),
            new( 95, 7, 13 ),
            new( 98, 7, 13 ),
            new( 99, 7, 14 ),
            new( 100, 7, 14 ),
            new( 102, 7, 14 ),
            new( 104, 7, 14 ),
            new( 106, 6, 15 ),
            new( 107, 6, 15 ),
            new( 109, 6, 15 ),
            new( 111, 6, 15 ),
            new( 113, 6, 15 ),
            new( 114, 6, 15 ),
            new( 115, 5, 15 ),
            new( 118, 5, 15 ),
            new( 120, 5, 15 ),
            new( 121, 5, 15 ),
            new( 122, 5, 15 ),
            new( 125, 5, 14 ),
            new( 126, 5, 14 ),
            new( 127, 6, 13 ),
            new( 129, 6, 13 ),
            new( 131, 8, 12 ),
            new( 132, 9, 12 ),
            new( 133, 10, 11 ),
            new( 134, 12, 11 ),
            new( 136, 14, 10 ),
            new( 137, 16, 10 ),
            new( 138, 17, 9 ),
            new( 139, 19, 9 ),
            new( 141, 21, 8 ),
            new( 142, 23, 8 ),
            new( 143, 24, 8 ),
            new( 80, 79, 79 ),
            new( 80, 80, 80 ),
            new( 81, 81, 80 ),
            new( 82, 81, 81 ),
            new( 83, 83, 83 ),
            new( 84, 84, 83 ),
            new( 85, 84, 84 ),
            new( 86, 85, 85 ),
            new( 87, 87, 86 ),
            new( 88, 87, 87 ),
            new( 89, 88, 88 ),
            new( 89, 89, 88 ),
            new( 91, 90, 90 ),
            new( 92, 91, 91 ),
            new( 92, 92, 91 ),
            new( 93, 93, 92 ),
            new( 95, 94, 94 ),
            new( 95, 95, 94 ),
            new( 96, 96, 95 ),
            new( 97, 96, 96 ),
            new( 98, 98, 97 ),
            new( 99, 99, 98 ),
            new( 100, 99, 99 ),
            new( 101, 100, 100 ),
            new( 102, 102, 101 ),
            new( 103, 102, 102 ),
            new( 104, 103, 103 ),
            new( 104, 104, 103 ),
            new( 106, 105, 105 ),
            new( 107, 106, 106 ),
            new( 107, 107, 106 ),
            new( 108, 108, 107 ),
            new( 110, 109, 109 ),
            new( 111, 110, 110 ),
            new( 111, 111, 110 ),
            new( 112, 112, 111 ),
            new( 114, 113, 113 ),
            new( 114, 114, 113 ),
            new( 115, 115, 114 ),
            new( 116, 115, 115 ),
            new( 118, 117, 116 ),
            new( 118, 118, 117 ),
            new( 119, 119, 118 ),
            new( 120, 119, 119 ),
            new( 121, 121, 120 ),
            new( 122, 122, 121 ),
            new( 123, 123, 122 ),
            new( 124, 123, 123 ),
            new( 125, 125, 124 ),
            new( 126, 126, 125 ),
            new( 127, 127, 126 ),
            new( 129, 128, 127 ),
            new( 129, 129, 128 ),
            new( 130, 130, 129 ),
            new( 131, 131, 130 ),
            new( 133, 132, 131 ),
            new( 133, 133, 132 ),
            new( 134, 134, 133 ),
            new( 135, 135, 134 ),
            new( 137, 136, 135 ),
            new( 137, 137, 136 ),
            new( 138, 138, 137 ),
            new( 139, 139, 138 ),
            new( 141, 140, 140 ),
            new( 141, 141, 140 ),
            new( 142, 142, 141 ),
            new( 143, 143, 142 ),
            new( 145, 144, 144 ),
            new( 146, 145, 144 ),
            new( 146, 146, 145 ),
            new( 147, 147, 146 ),
            new( 149, 149, 148 ),
            new( 150, 149, 149 ),
            new( 151, 150, 149 ),
            new( 151, 151, 150 ),
            new( 153, 153, 152 ),
            new( 154, 154, 153 ),
            new( 155, 154, 154 ),
            new( 156, 155, 154 ),
            new( 157, 157, 156 ),
            new( 158, 158, 157 ),
            new( 159, 159, 158 ),
            new( 160, 160, 159 ),
            new( 162, 161, 160 ),
            new( 163, 162, 161 ),
            new( 163, 163, 162 ),
            new( 164, 164, 163 ),
            new( 166, 166, 165 ),
            new( 167, 166, 166 ),
            new( 168, 167, 167 ),
            new( 169, 168, 167 ),
            new( 170, 170, 169 ),
            new( 171, 171, 170 ),
            new( 172, 172, 171 ),
            new( 173, 173, 172 ),
            new( 175, 174, 174 ),
            new( 176, 175, 174 ),
            new( 177, 176, 175 ),
            new( 177, 177, 176 ),
            new( 179, 179, 178 ),
            new( 180, 180, 179 ),
            new( 181, 181, 180 ),
            new( 183, 183, 182 ),
            new( 184, 183, 183 ),
            new( 185, 184, 183 ),
            new( 186, 185, 184 ),
            new( 187, 187, 186 ),
            new( 188, 188, 187 ),
            new( 189, 189, 188 ),
            new( 190, 190, 189 ),
            new( 192, 192, 191 ),
            new( 193, 193, 192 ),
            new( 194, 194, 193 ),
            new( 195, 195, 194 ),
            new( 197, 197, 195 ),
            new( 198, 197, 196 ),
            new( 199, 198, 197 ),
            new( 200, 199, 198 ),
            new( 202, 201, 200 ),
            new( 203, 202, 201 ),
            new( 204, 203, 202 ),
            new( 204, 204, 203 ),
            new( 206, 206, 205 ),
            new( 207, 207, 206 ),
            new( 208, 208, 207 ),
            new( 209, 209, 208 ),
            new( 211, 211, 210 ),
            new( 212, 212, 211 ),
            new( 213, 213, 212 ),
            new( 214, 214, 213 ),
            new( 216, 216, 215 ),
            new( 217, 217, 216 ),
            new( 218, 218, 217 ),
            new( 219, 219, 218 ),
            new( 221, 221, 220 ),
            new( 222, 222, 221 ),
            new( 223, 223, 222 ),
            new( 224, 224, 223 ),
            new( 226, 226, 225 ),
            new( 227, 227, 226 ),
            new( 228, 228, 227 ),
            new( 230, 229, 228 ),
            new( 232, 231, 230 ),
            new( 233, 232, 231 ),
            new( 234, 233, 232 ),
            new( 235, 235, 233 ),
            new( 237, 237, 235 ),
            new( 238, 238, 236 ),
            new( 239, 239, 238 ),
            new( 240, 240, 239 ),
            new( 242, 242, 241 ),
            new( 243, 243, 242 ),
            new( 244, 244, 243 ),
            new( 248, 254, 105 ),
            new( 246, 253, 103 ),
            new( 245, 252, 100 ),
            new( 244, 252, 98 ),
            new( 241, 250, 93 ),
            new( 240, 249, 90 ),
            new( 239, 248, 87 ),
            new( 238, 247, 84 ),
            new( 236, 245, 78 ),
            new( 235, 243, 75 ),
            new( 235, 242, 72 ),
            new( 234, 241, 69 ),
            new( 234, 238, 64 ),
            new( 234, 237, 62 ),
            new( 234, 235, 61 ),
            new( 234, 234, 59 ),
            new( 234, 231, 56 ),
            new( 233, 230, 55 ),
            new( 233, 228, 54 ),
            new( 233, 227, 52 ),
            new( 233, 224, 50 ),
            new( 232, 223, 49 ),
            new( 232, 221, 48 ),
            new( 232, 220, 48 ),
            new( 232, 217, 46 ),
            new( 231, 216, 45 ),
            new( 231, 215, 44 ),
            new( 231, 213, 43 ),
            new( 230, 211, 42 ),
            new( 230, 209, 41 ),
            new( 230, 208, 40 ),
            new( 229, 207, 40 ),
            new( 229, 204, 38 ),
            new( 229, 203, 38 ),
            new( 228, 201, 37 ),
            new( 228, 200, 37 ),
            new( 227, 198, 35 ),
            new( 227, 196, 35 ),
            new( 227, 195, 34 ),
            new( 226, 194, 33 ),
            new( 226, 191, 32 ),
            new( 225, 190, 32 ),
            new( 225, 189, 31 ),
            new( 224, 187, 31 ),
            new( 224, 185, 30 ),
            new( 223, 184, 29 ),
            new( 223, 182, 29 ),
            new( 223, 181, 28 ),
            new( 222, 179, 27 ),
            new( 221, 177, 26 ),
            new( 221, 176, 26 ),
            new( 221, 175, 25 ),
        ];


        Colormap = new CustomPalette(colors);
    }
}

